Passed
Push — main ( 77d3fe...01d98a )
by Andrii
01:56
created

map.spec.tsx ➔ ThirdPartyComponent   A

Complexity

Conditions 2

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
1
import React from "react"
2
import expectRender from "../expect-to-same-render";
3
import type { ClassHash } from "../src";
4
import { classNamesMap } from "../src";
5
import { Tooltip } from "reactstrap";
6
7
const classnames = {Root: "App", "Item--active": "hash1"} as Record<"Root"|"Theme--dark"|"Item--active", ClassHash>
8
, {Root} = classnames
9
, mapping = classNamesMap(classnames)
10
11
it("reactstrap Tooltip", () => expectRender(
12
  <Tooltip {...mapping({} as typeof Tooltip, {
13
    target: {Root},
14
    popperClassName: {"Theme--dark": true},
15
    innerClassName: {"Item--active": true},
16
  })}/>
17
).toSame(
18
  // No static render
19
))
20
21